package fr.paris5.miniWars.Screen;

import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TmxMapLoader;
import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer;

import fr.paris5.miniWars.MiniWars;

public class TiledTestScreen extends AbstractScreen {
	TiledMap map;
	OrthogonalTiledMapRenderer renderer;


	public TiledTestScreen(MiniWars game) {
		super(game);
	}

	@Override
	public void show() {
		super.show();

		map = new TmxMapLoader().load("data/map.tmx");
		renderer = new OrthogonalTiledMapRenderer(map, 1f);
	}


	@Override
	public void render(float delta) {
		super.render(delta);
		renderer.setView((OrthographicCamera) stage.getCamera());
		renderer.render();
	}
}
